12. Use the For Loop

Use the For Loop

Question:

Start Quiz:

Solution:

Hint

Here is an example of a for loop:

for (int index = 0; index < 3; index++) { 
Log.v("NumbersActivity", "Index:" + index + " Value:" + words.get(index));
}

that will display the following output in the logs:


Index:0 Value:one
Index:1 Value:two
Index:2 Value:three


These are the changes needed to complete the quiz.

This is the state of the code after completing the quiz.